package com.enhinck.dbutilweb.model.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.enhinck.dbutilweb.common.constant.EnvEnum;
import com.enhinck.dbutilweb.common.constant.MasterSlaveEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 数据源表
 *
 * @author enhinck Generate auto created
 * @date 2021-03-03 10:52:04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "b_datasource_conf")
public class DatasourceConfDO extends MyBatisPlusBaseDO<DatasourceConfDO> {

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 服务名
     */
    private String name;

    /**
     * 驱动名
     */
    private String driverClassName;

    /**
     * 数据库连接地址
     */
    private String url;

    /**
     * 账号
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtCreate;

    /**
     * 更新
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtUpdate;

    /**
     * 逻辑删除标记
     */
    @TableLogic(value = "0", delval = "1")
    private String status;
}